<?php

function showHeader($title='') {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
<?php
if (empty($title)) {
	echo '<title>DMDirc addons directory</title>'."\r\n";
} else {
	echo '<title>DMDirc addons directory :: '.$title.'</title>'."\r\n";
}
?>
  <link rel="stylesheet" type="text/css" href="http://www.dmdirc.com/res/style.css">
 </head>
 <body>
  <div id="container">
   <img id="logo" src="http://www.dmdirc.com/res/logo.png" alt="DMDirc logo">
   <h1>DMDirc</h1>
<?PHP
 define('PREFIX', 'http://www.dmdirc.com/');
 define('NOINT', 'true');
 define('PAGE', 'addons');

 require('../inc/menu.php');

?>
   <ul id="submenu" class="page_addons">
    <li<?PHP doSubActive('home'); ?>><a href="/">Home</a></li>
    <li<?PHP doSubActive('actions'); ?> style="margin-left: 20px;"><a href="/actions">Action packs</a></li>
    <li<?PHP doSubActive('plugins'); ?>><a href="/plugins">Plugins</a></li>
    <li<?PHP doSubActive('themes'); ?>><a href="/themes">Themes</a></li>
<?php

Users::showUserMenu();

?>
   </ul>
   <div id="content">
<?php
}

function show403() {
	echo '    <h2>Forbidden</h2>'."\r\n";
	echo '    <p>You do not have access to this page.</p>'."\r\n";
	if (!Users::isLoggedIn()) {
		echo '    <p><a href="/login">Login</a> and try again.</p>'."\r\n";
	}
}

function showFooter() {
?>
   </div>
   <div id="footer">
   </div>
  </div>
 </body>
</html>
<?php
}

if (get_magic_quotes_gpc()) {
	foreach ($_POST as $k => $v) {
		$_POST[$k] = stripslashes($v);
	}
}
?>
